package com.google.guava.eventbus;

import com.google.common.eventbus.AsyncEventBus;
import com.google.guava.eventbus.listeners.SimpleListener;

import java.util.concurrent.Executors;

/**
 * @author fuc
 * @create 2020-10-08
 */
public class AsyncEventBusExample {

  public static void main(String[] args) {
    AsyncEventBus eventBus = new AsyncEventBus(Executors.newFixedThreadPool(4));
    eventBus.register(new SimpleListener());
    eventBus.post("hello");
  }
}
